const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  name: state => state.user.userInfo.username,
  // 把user模块下的userInfo中staffPhoto 封装成全局getters
  staffPhoto: state => state.user.userInfo.staffPhoto,
  routes: state => state.permission.routes,
  roles: state => state.user.userInfo.roles
  // token: (state) => { return state.user.token }
  // token: function(state) {
  //   return state.user.token
  // }
}
export default getters
